#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.common.bean.po;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Description: Menu po
 *
 * @author wupanhua
 * @date 2019/8/6 15:28
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
@Data
@AllArgsConstructor
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty("主键")
    private Long id;
    /**
     * 菜单名
     */
    @ApiModelProperty("菜单名")
    private String name;
    /**
     * 图标
     */
    @ApiModelProperty("图标")
    private String icon;
    /**
     * 链接
     */
    @ApiModelProperty("链接")
    private String url;
    /**
     * 排序
     */
    @ApiModelProperty("排序")
    private Integer orderd;
    /**
     * 父级菜单
     */
    @ApiModelProperty("父级菜单")
    private Long parentid;
    /**
     * 状态
     */
    @ApiModelProperty("状态")
    private Integer status;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private Date createdate;
    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    private Date updatedate;

    private Menu submenu;

    private List<Menu> menus;

    public Menu() {
    }

    public Menu(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public Menu(Long id) {
        this.id = id;
    }

    /**
     * Description:
     * <菜单状态描述>
     * @author wupanhua
     * @date 10:41 2019/8/8
     **/
    enum Status {

        /**
         * 启用 禁用 菜单状态
         */
        ON(1, "启用"),
        OFF(0, "禁用");

        private Integer code;
        private String descript;

        Status(Integer code, String descript) {
            this.code = code;
            this.descript = descript;
        }

        public Integer getCode() {
            return code;
        }

        public String getDescript() {
            return descript;
        }

    }
}
